chcp 65001 > nul
setlocal enabledelayedexpansion
@echo off

rem @Author:cosann
rem @email: 1066190125@qq.com
rem @Script_Name:Re_Shortcut.bat
rem @Version:1.0
rem @Create_Date:20230309
rem @Description:
rem Windows快捷方式备份还原脚本
rem @Update content:


title "快捷方式备份还原脚本"

:main
echo "快捷方式备份还原"
echo
echo "1. 初始化环境"
echo "2. 备份快捷方式"
echo "3. 恢复快捷方式"
echo "4. 退出脚本"

set n=
set /p var="请输入序号选择执行功能:"

if "%var%" == "1" (
    echo "the number equal to 1"
    call pip install pypiwin32
    goto main
    pause >nul
) else if "%var%" == "2" (
    call python Reshortcut.py -b
    goto main
    pause >nul
) else if "%var%" == "3" (
    set /p DISK="请输入还原快捷方式的目标磁盘分区序号(例如:C D E F...)"
    set CMD=python Reshortcut.py -m !DISK!
    echo !CMD!
    !CMD!
    goto main
    pause >nul
) else if "%var%" == "4" (
    pause
    exit
) else (
    echo "input wrong number"
    goto main
    pause >nul
)

